Skip to content

feat(core): report scenario override outcomes - #6

Open
92Infinitus92 wants to merge 9 commits into
developfrom
feat/scenario-override-outcomes
Open

feat(core): report scenario override outcomes#6
92Infinitus92 wants to merge 9 commits into
developfrom
feat/scenario-override-outcomes

Conversation

@92Infinitus92

@92Infinitus92 92Infinitus92 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator
  • Return a typed outcome for every scenario override.
  • Report whether each override was applied or skipped, including the reason.
  • Add outcome-aware time travel for pending overrides.
  • Preserve RPC error classification and expose the new contract through the Node SDK.

Greptile Summary

The PR adds typed applied/skipped outcomes for scenario overrides and exposes them through scenario registration, time travel, and the Node SDK.

  • Stages override materialization and coordinates schedule updates across storage backends.
  • Returns outcome details while preserving RPC error classification.
  • Updates shared Rust contracts, endpoint metadata, generated TypeScript bindings, and integration coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/core/src/surfnet/svm.rs Implements outcome-aware scheduling, staged materialization, atomic persistent commits, replacement batching, and time-travel handling; previously reported failure paths are resolved or intentionally accepted.
crates/core/src/storage/mod.rs Extends the storage contract with batch operations needed to coordinate scheduled override updates.
crates/core/src/storage/sqlite.rs Implements transactional batch and cross-table operations for SQLite-backed schedules and account state.
crates/core/src/storage/postgres.rs Implements transactional batch and cross-table operations for PostgreSQL-backed schedules and account state.
crates/core/src/rpc/surfnet_cheatcodes.rs Changes scenario registration and time travel RPC responses to expose typed override outcomes.
crates/types/src/scenarios.rs Defines the shared override outcome contract used by runtime and client surfaces.
crates/types/src/types.rs Adds the outcome-aware time-travel response contract.
crates/sdk-node/surfpool-sdk/kit/types/api.ts Updates the Node SDK cheatcode API to reflect the new scenario and time-travel response shapes.

Sequence Diagram

sequenceDiagram
    participant Client
    participant RPC
    participant SVM
    participant Schedule
    participant Accounts
    Client->>RPC: registerScenario / timeTravel
    RPC->>SVM: materialize scheduled overrides
    SVM->>Schedule: read target-slot batch
    SVM->>Accounts: stage account mutations
    SVM->>Schedule: atomically remove committed batch
    SVM-->>RPC: applied/skipped outcomes
    RPC-->>Client: typed outcome response
Loading

Reviews (14): Last reviewed commit: "refactor(rpc): return outcomes from time..." | Re-trigger Greptile

Context used (5)

@92Infinitus92 92Infinitus92 self-assigned this Aug 14, 2026
Comment thread crates/core/src/surfnet/svm.rs
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs
@92Infinitus92
92Infinitus92 force-pushed the feat/scenario-override-outcomes branch 2 times, most recently from 291cabf to 3601a68 Compare August 17, 2026 09:02
Comment thread crates/core/src/surfnet/svm.rs

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

92Infinitus92 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@failfmi

failfmi commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

@greptileai

@92Infinitus92
92Infinitus92 force-pushed the feat/scenario-override-outcomes branch from eae563d to c4da86e Compare August 21, 2026 13:54
@92Infinitus92

Copy link
Copy Markdown
Collaborator Author

@greptileai

@92Infinitus92
92Infinitus92 force-pushed the feat/scenario-override-outcomes branch from ececcd7 to 2427e2f Compare August 25, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants